<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <title>03.展开</title>
</head>

<body>

</body>
<script type="text/javascript">
    // let arr = [1, 2, 3]

    // function sum(a, b, c) {
    //     return a + b + c
    // }
    // const count = sum(arr[0], arr[1], arr[2], )
    // const total = sum(...arr)
    // console.log("first", total)
    let obj={
        name:"孙悟空",
        age:"18",
        gender:"男"
    }
    const obj2 = {...obj};
    console.log('obj2',obj2);
    obj2.name = "沙和尚"
    console.log("obj",obj,obj2);
</script>

</html>